import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
/* Layout */
// import Layout from '@/layout';
// 所有权限通用路由表
// 如首页和登录页和一些不用权限的公用页面
export const constantRoutes = [
  // 一体化应用决策分析中心-越城区(大屏)
  // {
  //   path: '/supervisionFund',
  //   component: Layout,
  //   name: 'supervisionFund',
  //   redirect: '/supervisionFund/h1',
  //   meta: {
  //     title: '首页大屏'
  //   },
  //   children: [
  //     {
  //       path: '/supervisionFund/h1',
  //       name: 'supervisionFund1',
  //       component: () => import('@/views/supervisionFund'),
  //       meta: {
  //         isHideTop: 1, // 显示头部nav
  //         fullAppMain: 1 // <App-Main /> 100 vh
  //       }
  //     }
  //   ]
  // },
  {
    path: '/digitalScene',
    component: () => import('@/views/digitalScene/index'),
    name: 'digitalScene'
  },

  {
    path: '/quotaInvoice',
    component: () => import('@/views/quotaInvoice/index'),
    name: 'quotaInvoice'
  },
  {
    path: '/mapTest',
    component: () => import('@/views/mapTest/index'),
    name: 'mapTest'
  },
  {
    path: '/mapTest1',
    component: () => import('@/views/digitalScreen/index'),
    name: 'mapTest1'
  },
  {
    path: '/qixian/town',
    component: () =>
             import('@/views/largeScreen/fundSupervisionTown/index.vue'),
    name: 'digitalScene1'
  },

  {
    path: '/login',
    component: () => import('@/views/login/index'),
    name: 'login'
  },
  // 乡镇资金监管首页
  {
    path: '/townHomePage',
    component: () => import('@/views/townHomePage/index'),
    name: 'townHomePage'
  },
  // 业财首页
  {
    path: '/propertyHomePage',
    component: () => import('@/views/propertyHomePage/index'),
    name: 'propertyHomePage'
  },
  // 业务中心申请数等页面
  {
    path: '/bussinessPage',
    component: () =>
    import('@/views/businessCenterPage/index'),
    name: 'bussinessPage'
  },
  // 越城区首页
  {
    path: '/YCContainer',
    component: () => import('@/views/YCContainer/index'),
    name: 'YCContainer'
  },
  {
    path: '/NextMain',
    component: () => import('@/views/homwAnalyse/nextMain')
  },
  {
    path: '/incomeAnalyse',
    component: () => import('@/views/homewAnalyse1/index')
  },
  {
    path: '/townPreviewKq',
    component: () => import('@/views/townPreviewKq/index.vue')
  },
  {
    path: '/yaoantongBigScreen',
    component: () =>
             import('@/views/yaoantongBigScreen/index.vue')
  },

  // 业务中心页面
  {
    path: '/townExpend',
    component: () => import('@/views/townExpend/index.vue')
  },
  // 打印
  {
    path: '/lodop',
    component: () => import('@/views/lodop/index.vue')
  },
  {
    path: '/specialPrint',
    component: () => import('@/views/lodop/specialPrint.vue')
  },

  {
    path: '/fundSupervision',
    component: () => import('@/views/townExpend/index.vue')
  },
  {
    path: '/largeScreen1',
    component: () =>
             import('@/views/largeScreen/fundSupervisionTownsheng/index.vue')
  },
  {
    path: '/largeScreen2',
    component: () =>
             import('@/views/largeScreen/fundSupervisionTownshi/index.vue')
  },
  {
    path: '/largeScreen3',
    component: () =>
             import('@/views/largeScreen/fundSupervisionArea/index.vue')
  },
  {
    path: '/largeScreen4',
    component: () =>
             import('@/views/largeScreen/fundSupervisionTown/index.vue')
  },
  {
    path: '/largeScreen/kqOnePage',
    component: () =>
             import('@/views/largeScreen/kqOnePage/index copy.vue')
  },
  {
    path: '/taskInstance',
    name: 'Next',
    // component:() => import(/* webpackChunkName: "about" */ "@/views/Home.vue") ,
    component: () => import('@/views/taskInstance/index.vue')
  },
  // // 业务中心页面
  // {
  //   path: '/KqHeaderPage',
  //   component: Layout,
  //   name: 'KqHeaderPage',
  //   redirect: '/KqHeaderPage/digitalReportQr1',
  //   meta: {
  //     title: '首页大屏'
  //   },
  //   children: [
  //     {
  //       path: '/KqHeaderPage/digitalReportQr1',
  //       component: () => import('@/views/digitalReportQr1/index.vue')
  //     },

  //   ]
  // },

  // 一码通管
  // {
  //   path: '/ceshi',
  //   component: Layout,
  //   name: 'digital',
  //   redirect: '/ceshi/ceshi?isHideTop=1&isHideLeft=0',
  //   meta: {
  //     title: '业务中心'
  //   },
  //   children: [
  //     {
  //       path: '/ceshi/ceshi',
  //       name: 'ceshi',
  //       component: () => import('@/views/digitalReport1/index.vue'),
  //       meta: {
  //         title: '一码通管'
  //       }
  //     },

  //     {
  //       path: '/ceshi/ceshi1',
  //       name: 'ceshi1',
  //       component: () => import('@/views/TempletePage/index.vue'),
  //       meta: {
  //         title: '一码通管'
  //       }
  //     }
  //   ]
  // },
  // 柯桥首页
  {
    path: '/special/home',
    component: () => import('@/views/specialHome/index.vue'),
    name: 'specialHome'
  },
  // 测试草稿
  {
    path: '/error',
    component: () => import('@/views/404.vue'),
    name: 'error'
  }
];
export const asyncAdminRoutes = [];
// 实例化vue的时候只挂载constantRouter
const createRouter = () => new Router({
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
});

const router = createRouter();
export function resetRouter() {
  const newRouter = createRouter();
  router.matcher = newRouter.matcher;
}

export default router;
